package com.bestv.search.management.datasyn;

import org.apache.log4j.Logger;

import java.util.Map;

/**
 * @author Michael Wang
 */
public class ScheduleSyncManager {

    static Logger logger = Logger.getLogger(ScheduleSyncManager.class);

    public static void sync(Map<String, String> p) throws Exception {
        String sTYPE = p.get("type");
        logger.info("Sync schedule from " + sTYPE + " @" + p.get("branch") + " with syncer: " + p.get("syncer"));
        if (sTYPE.equals("local")) {
            new LocalFileScheduleSyncer(p);
        }
    }
}
